package springboot.file.config;


import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author daiqiang
 * @since 2024/7/12-21:13
 */
@Configuration
public class minioConfig {
    @Value("127.0.0.1")
    private  String endpoint;
    @Value("9000")
    private  Integer port;
    @Value("ydq123456")
    private  String accessKey;
    @Value("ydq123456")
    private  String secretKey;
    @Value("daiqiang")
    private  String bucketName;
    @Value("false")
    private  Boolean secure;

    @Bean
    public MinioClient minioClient(){
        return MinioClient.builder()
                .endpoint(endpoint,port,secure)
                .credentials(accessKey,secretKey)
                .build();
    }




}
